<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppMsgInfoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('msg_info', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->string('title')->comment('消息标题');
			$table->text('content', 65535)->nullable()->comment('消息内容');
			$table->string('logo')->default('')->comment('消息图片');
			$table->boolean('type')->comment('消息类型');
			$table->text('detail', 65535)->nullable()->comment('消息详情');
			$table->string('url')->nullable()->comment('消息链接');
			$table->boolean('status')->nullable()->default(1)->comment('状态 1未发送 2已发送 3已删除');
			$table->dateTime('send_time')->nullable()->comment('发送时间');
			$table->boolean('user_type')->default(1)->comment('用户类型 1全部用户 2部分用户');
			$table->integer('create_id')->nullable()->comment('发送人');
			$table->dateTime('create_time')->nullable();
			$table->dateTime('update_time')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('app_msg_info');
	}

}
